import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //获取系列产品下交易流水列表
  getTradeList: (query) => api.get(`${config.interfaces.type1}assetSplitRealTradeFlow/getTradeList`, query),

  //真实流水录入
  saveTradeFlow: (query) => api.post(`${config.interfaces.type1}assetSplitRealTradeFlow/saveTradeFlow `, query),

  //删除真实流水
  deleteFlow: (query) => api.get(`${config.interfaces.type1}assetSplitRealTradeFlow/deleteFlow`, query),

  //回退流水
  rollbackSplitTrade: (query) => api.get(`${config.interfaces.type1}assetSplitRealTradeFlow/rollbackSplitTrade`, query),

  //保存手工拆分
  saveHandalSplitTrade: (query) => api.post(`${config.interfaces.type1}assetSplitRealTradeFlow/saveHandalSplitTrade`, query),

  //智能拆分的表格数据
  splitTrade: (query) => api.get(`${config.interfaces.type1}assetSplitRealTradeFlow/splitTrade`, query),

  //智能拆分的下拉
  getProductByType: (query) => api.get(`${config.interfaces.type1}assetSplit/asset-split-product-basic-info/getProductByType`, query),

  //已拆分流水列表
  getSplitTradeList: (query) => api.get(`${config.interfaces.type1}assetSplitRealTradeFlow/getSplitTradeList`, query),
  //确认转仓
  confirmAdust: (query) => api.post(`${config.interfaces.type1}assetSplitRealTradeFlow/rollover`, query),
  //内部转仓-试算
  tryCalc: (query) => api.post(`${config.interfaces.type1}assetSplitRealTradeFlow/splitListCheck`, query),
  //内部转仓-二元自动转仓
  smartTrans: (query) => api.post(`${config.interfaces.type1}assetSplitAutoTrans/autoTrans`, query),
  //查询系列产品的全部持仓
  queryAllProduct: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/find-all-products`, query),
  //整体转仓
  totalTransfer: (query) => api.get(`${config.interfaces.type1}assetSplitAutoTrans/listAutoTrans`, query),
  //获取产品下拉 拆分弹窗里的手工拆分
  getProductListByListId: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/queryProductList`, query),
  //获取下载类型
  getExportTypeList: (query) => api.get(`${config.interfaces.type1}assetSplit/exportAssetSplitGen/queryAssetExportBankList`, query),
  //获取该真实流水是多资产还是单资产
  getAssetType: (query) => api.get(`${config.interfaces.type1}assetSplitRealTradeFlow/queryAssetCountByRid`, query),
};
